Silk Mobile

Table of Contents (Homepage)

Event Recording - Android

Multi -Touch actions

Event recording for Android devices can be done on the device itself. So, it is possible to also create events for multi touch gestures.

Step 1: Click on the "Device" tab, and then click on 'Event Recording' button.

images/download/attachments/2688800/1.jpg

Event recording module

images/download/attachments/2688800/2.jpg

Step 2: Choose the device to record with and Click on the 'Record' button.

images/download/attachments/2688800/3.jpg

Step 3: You can use the real device to record with. Move your fingers on the real device to create the event.

Note: It should be a single action.

I n the following example we will record a zoom in event on Google maps.

images/download/attachments/2688800/4.jpg

Step 4: When you finish recording, click the 'Stop' button.

images/download/attachments/2688800/5.jpg

Step 5: Click the 'Play' button to see if the action has been recorded the way you wanted.

images/download/attachments/2688800/6.jpg

Step 6: Click the 'Save' button in order to save the event.

On our example we will name the event ZoomIn.

Saving the event will enable us to use it on the tests.

images/download/attachments/2688800/7.jpg

You will then be ask you if you want to add this event in your current script.

images/download/attachments/2688800/8.jpg

C licking 'Yes' will add a new step at the end of the script.

Step 7: The command to execute the event is "sendText".

The Text parameter will be {event:event name}.

images/download/attachments/2688800/9.jpg

Code Examples

Java Example
client.sendText("{event:ZoomIn}");
C# Example
client.SendText("{event:ZoomIn}");
VBScript Example
client.SendText "{event:ZoomIn}"
Report
Python Example
self.client.sendText("{event:ZoomIn}")
Perl Example
$client->sendText("{event:ZoomIn}");